#!/usr/lib/perl
use warnings;
use utf8;
use 5.014;

chomp (my @toRet = <STDIN>);
@toRet = reverse @toRet;

foreach(@toRet){
	say $_;
	}

# print reverse <>;
